STEP 5: That was easy, right? But what happens if we want the user to control the number and color of stars?

  • Let's make a function called get_user_input. It'll return the number and color of the stars the user specifies.
  • In , drag in Define Function with Docstring above def·handle_user_errors():.
  • Rename my_function to get_user_input.
  • Finally, change your docstring to the following: """ Gets the user's input from the console """

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)